Method and apparatus for derivation of motion vector predictor candidate set

ABSTRACT

A method and apparatus for deriving a motion vector predictor (MVP) candidate set for a block are disclosed. Embodiments according to the present invention generate a complete full MVP candidate set based on the redundancy-removed MVP candidate set if one or more redundant MVP candidates exist. In one embodiment, the method generates the complete full MVP candidate set by adding replacement MVP candidates to the redundancy-removed MVP candidate set and a value corresponding to a non-redundant MVP is assigned to each replacement MVP candidate. In another embodiment, the method generates the complete full MVP candidate set by adding replacement MVP candidates to the redundancy-removed MVP candidate set and a value is assigned to each replacement MVP candidate according to a rule. The procedure of assigning value, checking redundancy, removing redundant MVP candidate are repeated until the MVP candidate set is complete and full.

CROSS REFERENCE TO RELATED APPLICATIONS

The present invention is a Continuation of U.S. patent application, Ser. No. 14/239,302, filed on Feb. 18, 2014, now U.S. Pat. No. 9,872,016, which is a National Phase of PCT Application No. PCT/CN2012/083133, filed on Oct. 18, 2012, which claims priority to U.S. Provisional Patent Application, Ser. No. 61/548,991, filed on Oct. 19, 2011, entitled “Complete MVP Candidate Set”. The Applications are hereby incorporated by reference in their entirety.

FIELD OF THE INVENTION

The present invention relates to video coding. In particular, the present invention relates to derivation of motion vector predictor (MVP) candidate set for High Efficiency Video Coding (HEVC).

BACKGROUND

High-Efficiency Video Coding (HEVC) is a new international video coding standard that is being developed by the Joint Collaborative Team on Video Coding (JCT-VC). HEVC is based on the hybrid block-based motion-compensated DCT-like transform coding architecture. The basic unit for compression, termed Coding Unit (CU), is a 2N×2N square block, and each CU can be recursively split into four smaller CUs until a predefined minimum size is reached. Each CU contains one or multiple Prediction Units (PUs). The PU sizes can be 2N×2N, 2N×N, 2N×nU, 2N×nD, N×2N, nL×2N, nR×2N, or N×N, where 2N×N, 2N×nU, 2N×nD and N×2N, nL×2N, nR×2N correspond to horizontal and vertical partition of a 2N×2N PU with symmetric or asymmetric PU size division respectively.

To further increase the coding efficiency of motion vector coding in HEVC, the motion vector competition (MVC) based scheme is applied to select one motion vector predictor (MVP) among a given MVP candidate set which includes spatial and temporal MVPs. There are three inter-prediction modes including Inter, Skip, and Merge in the HEVC test model version 3.0 (HM-3.0). The Inter mode performs motion-compensated prediction with transmitted Motion Vector Differences (MVDs) that can be used together with MVPs for deriving motion vectors (MVs). The Skip and Merge modes utilize motion inference methods (MV=MVP+MVD where MVD is zero) to obtain the motion information from spatial neighboring blocks (spatial candidates) or temporal blocks (temporal candidates) located in a co-located picture. The co-located picture is the first reference picture in list 0 or list 1 , which is signaled in the slice header.

When a PU is coded in either Skip or Merge mode, no motion information is transmitted except for the index of the selected candidate. In the case of a Skip PU, the residual signal is also omitted. For the Inter mode in HM-3.0, the Advanced Motion Vector Prediction (AMVP) scheme is used to select a motion vector predictor among an AMVP candidate set including two spatial MVPs and one temporal MVP. As for the Merge and Skip mode in HM-3.0, the Merge scheme is used to select a motion vector predictor among a Merge candidate set containing four spatial MVPs and one temporal MVP.

For the Inter mode, the reference picture index is explicitly transmitted to the decoder. The MVP is then selected among the candidate set for a given reference picture index. FIG. 1 illustrates the MVP candidate set for the Inter mode according to HM-3.0, where the MVP candidate set includes two spatial MVPs and one temporal MVP:

-   -   1. Left predictor (the first available MV from A₀ and A₁),     -   2. Top predictor (the first available MV from B₀, B₁, and         B_(n+1)), and     -   3. Temporal predictor (the first available MV from T_(BR) and         T_(CTR)).

A temporal predictor is derived from a block (T_(BR) or T_(CTR)) in a co-located picture, where the co-located picture is the first reference picture in list 0 or list 1. The block associated with the temporal MVP may have two MVs: one MV from list 0 and one MV from list 1. The temporal MVP is derived from the MV from list 0 or list 1 according to the following rule:

-   -   1. The MV that crosses the current picture is chosen first, and     -   2. If both MVs cross the current picture or both do not cross,         the MV with the same reference list as the current list will be         chosen.

In HM-3.0, if a particular block is encoded in the Merge mode, an MVP index is signaled to indicate which MVP among the MVP candidate set is used for this block to be merged. To follow the essence of motion information sharing, each merged PU reuses the MV, prediction direction, and reference picture index of the selected candidate. It is noted that if the selected MVP is a temporal MVP, the reference picture index is always set to the first reference picture. FIG. 2 illustrates the MVP candidate set for the Merge mode according to HM-3.0, where the MVP candidate set includes four spatial MVPs and one temporal MVP:

-   -   1. Left predictor (A_(m)),     -   2. Top predictor (B_(n)),     -   3. Temporal predictor (the first available MV from T_(BR) or         T_(CTR)),     -   4. Above-right predictor (B₀), and     -   5. Below-left predictor (A₀).

In HM-3.0, a process is utilized in both Inter and Merge modes to avoid an empty candidate set. The process adds a candidate with a zero MV to the candidate set when no candidate can be inferred in the Inter, Skip or Merge mode.

Based on the rate-distortion optimization (RDO) decision, the encoder selects one final MVP for Inter, Skip, or Merge modes from the given MVP list and transmits the index of the selected MVP to the decoder after removing redundant MVPs in the list. However, because the temporal MVP is included in the MVP list, any transmission error may cause parsing errors at the decoder side and the error may propagate. When an MV of a previous picture is decoded incorrectly, a mismatch between the MVP list at the encoder side and the MVP list at the decoder side may occur. Therefore, subsequent MV decoding may also be impacted and the condition may persist for multiple subsequent pictures.

In HM-4.0, in order to solve the parsing problem related to Merge/AMVP in HM-3.0, fixed MVP list size is used to decouple MVP list construction and MVP index parsing. Furthermore, in order to compensate the coding performance loss caused by the fixed MVP list size, additional MVPs are assigned to the empty positions in the MVP list. In this process, Merge index is coded using truncated unary codes of fixed length equal to 5 or less, and AMVP index is coded using fixed length equal to 2 or less.

Another change in HM-4.0 is the unification of MVP positions. Both Merge and Skip use the same positions shown in FIG. 6.

Additional bi-predictive Merge candidates are created using original Merge candidates. The additional candidates are divided into three candidate types:

-   -   Combined bi-predictive Merge candidate (candidate type 1)     -   Scaled bi-predictive Merge candidate (candidate type 2)     -   Zero vector Merge/AMVP candidate (candidate type 3)

In candidate type 1, combined bi-predictive Merge candidates are created by combining original Merge candidate. Two candidates in original candidates are used to create bi-predictive Merge candidates. An example of the derivation process of combined bi-predictive Merge candidate is shown in FIGS. 3A-C, where mvL0_A(uni) refers to a motion vector mvL0 in list 0 with the reference picture index refldxL0 in list 0, and mvL1_B(uni) refers to a motion vector mvL1 in list 1 with the reference picture index refldxL1 in list 1. The original candidates are used to generate combined bi-predictive candidates as indicated by arrows 310 and 320. FIG. 3A illustrates the original Merge candidate list and FIG. 3B illustrates the Merge candidate list after adding combined candidates.

In candidate type 2, scaled bi-predictive Merge candidates are created by scaling original Merge candidates. One of the original candidates is used to create bi-predictive Merge candidates. The selected candidate corresponds to a motion vector mvLX with the reference picture index refIdxLX in list X, where X can be 0 or 1. For example, one candidate A is uni-predictive in list 0 with motion vector mvL0_A and reference picture index ref0. In order to derived the scaled candidate, ref0 is copied to reference index ref0′ in list 1 first. Then, mvL0′_A is calculated by scaling mvL0_A according to picture distance of current frame to ref0 and picture distance of current frame to ref0′. The bi-predictive Merge candidate, having mvL0_A and ref0 in list 0 and mvL0′_A and ref0′ in list 1, are then created and added into Merge candidate list. FIGS. 4A-C illustrate an example of the derivation process of the scaled bi-predictive Merge candidate. FIG. 4A and FIG. B correspond to the original Merge candidate list and the Merge list after adding scaled candidates respectively, where the corresponding Merge candidate derivations are indicated by arrows 410 and 420. FIG. 4C illustrates the Merge candidate derivations indicated by arrows 410 and 420 along with related reference pictures.

In candidate type 3, zero-vector Merge candidates and zero-vector AMVP candidates are created by combining zero vectors and reference index that can be referred. FIGS. 5A-D illustrates an example of adding Zero vector Merge candidates and zero vector AMVP candidates. FIG. 5A and FIG. 5B illustrate the original Merge candidate list and the Merge candidate list after adding zero-vector candidates respectively. The added zero-vector candidates are indicated by the dashed box 510. FIG. 5C and FIG. 5D illustrate the original AMVP candidate list and the AMVP candidate list after adding zero-vector candidates respectively. The added zero-vector candidates are indicated by the dashed boxes 520 and 530 for list 0 and list 1 respectively. If a zero-vector candidate is not duplicated, it is added to the respective Merge and AMVP candidate set.

For AMVP in HM-4.0 FIG. 6 illustrates the neighboring PUs configuration to derive the spatial and temporal MVPs for both AMVP and Merge. In AMVP, the left MVP is the first available motion vector between A₀ and A₁. The top MVP is the first available motion vector among B₀, B₁ and B₂. The temporal MVP is the first available motion vector between T_(BR) and T_(CTR). T_(BR) is used first and if T_(BR) is not available and otherwise T_(CTR) is used instead. If the left MVP is not available and the top MVP is not a scaled MVP, the second top MVP can be derived if there is a scaled MVP among B₀, B₁, and B₂. The number of MVPs in AMVP candidate set is 2 in HM-4.0. Therefore, after two spatial MVPs and one temporal MVP are derived, only the first two MVPs will be included in the candidate set. If the number of available MVPs is smaller than two after removing redundancy, then zero-vector candidates are added to the candidate set.

For Merge mode in HM-4.0, the MVP candidate derivation uses the same neighboring block configuration as shown in FIG. 6. Up to four spatial MVPs are derived from A₀, A₁, B₀ and B₁, and one temporal MVP is derived from T_(BR) or T_(CTR). T_(BR) is used first if T_(BR) is not available and otherwise T_(CTR) is used instead. If any of the four spatial MVPs is not available, the block B₂ is then used to derive MVP as a replacement. After the four spatial MVPs and one temporal MVP are derived, redundancy is checked and any redundant MVP will be removed. If the number of available MVPs is smaller than five after removing redundancy, three types of additional candidates are derived and added to the candidate set.

As illustrated above, the fixed-size Merge/AMVP candidate sets are used in HM-4.0 to overcome the issue associated with parsing error. Moreover, new MVPs are added to the candidate set after removing redundant MVPs in order to improve coding efficiency. However, the MVP candidate derivation for HM-4.0 does not necessarily provide a complete full set of MVP candidates. The number of MVPs in the candidate set may be less than the fixed target size specified. When a parsing error occurs, the encoder and decoder may have different MVP list. If the encoder sends an MVP index pointing to an empty space, mismatch between the encoder and decoder may occur if the encoder and decoder have different MVP lists. The state of mismatch may persist and cause error propagation in the decoder. Accordingly, it is desirable to develop methods of generating additional MVM candidates that can always result in a complete full MVP candidate set.

BRIEF SUMMARY OF THE INVENTION

A method and apparatus for deriving a motion vector predictor (MVP) candidate set for a block are disclosed. Embodiments according to the present invention generate a complete full MVP candidate set based on the redundancy-removed MVP candidate set if one or more redundant MVP candidates exist. The complete full MVP candidate set contains no redundant MVP candidates and the complete full MVP candidate set has a size equal to the fixed target size. In one embodiment, the method generates the complete full MVP candidate set by adding replacement MVP candidates to the redundancy-removed MVP candidate set and a value corresponding to a non-redundant MVP is assigned to each replacement MVP candidate. The value may correspond to motion vector if the MVP candidate set is for Advanced Motion Vector Prediction (AMVP) mode and the value may correspond to prediction direction, reference index, or the motion vector if the MVP candidate set is for Merge mode. The replacement MVP candidates may comprise one or both of a first zero vector with reference frame index equals to 0 in list 0 and a second zero vector with reference frame index equals to 0 in list 1.

In another embodiment, the method generates the complete full MVP candidate set by adding replacement MVP candidates to the redundancy-removed MVP candidate set, wherein a value is assigned to each replacement MVP candidate according to a rule. If the MVP candidate set still contains any redundant MVP candidate, the redundant MVP candidate is removed and one or more replacement MVP candidates are added. The procedure is iterated until the MVP candidate set is complete and full. The replacement MVP candidate may be assigned the value corresponding to motion vector for AMVP mode or prediction direction, reference index, or the motion vector for Merge mode. Furthermore, the motion vector may correspond to (x,0), (−x,0), (0,y), or (0,−y), wherein x is a first integer corresponding to horizontal motion vector and y is a second integer corresponding to vertical motion vector.

In yet another embodiment, the method generates the complete full MVP candidate set by assigning initial MVP candidates associated with neighboring blocks. The initial MVP candidates are assigned so that the MVP candidate set has a size equal to the fixed target size and the MVP candidate set contains no redundant MVP candidate. Furthermore, the procedure for conventional MVP candidate set can be applied to the initial MVP candidate set.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example of neighboring block configuration used to derive MVP candidate set for Inter mode based on AMVP scheme in HM3.0.

FIG. 2 illustrates an example of neighboring block configuration used to derive MVP candidate set for Skip and Merge modes in HM3.0.

FIGS. 3A-C illustrate an example of generating additional bi-predictive Merge candidates using combined bi-predictive Merge candidate based on original Merge candidates according to HM4.0.

FIGS. 4A-C illustrate an example of generating additional bi-predictive Merge candidates using scaled bi-predictive Merge candidate based on original Merge candidates according to HM4.0.

FIGS. 5A-D illustrate an example of generating additional bi-predictive Merge candidates using zero-vector Merge/AMVP candidate based on original Merge candidates according to HM4.0.

FIG. 6 illustrates an example of neighboring block configuration used to derive MVP candidate set for AMVP/Merge modes in HM4.0.

FIG. 7 illustrates an exemplary flow chart of a system incorporating an embodiment of the present invention, where initial values are assigned to the MVP candidates to generate a complete full MVP candidate set.

FIG. 8 illustrates an exemplary flow chart of a system incorporating an embodiment of the present invention, where the complete full MVP candidate set is generated from the redundancy-removed MVP candidate set.

FIG. 9 illustrates an exemplary flow chart of a system incorporating an embodiment of the present invention, where an iterative process is used to generate the complete full MVP candidate set.

DETAILED DESCRIPTION OF THE INVENTION

As mentioned before, mismatch between the encoder and decoder may occur when the encoder sends an MVP index pointing to an empty (undefined) space of the MVP candidate set. To overcome the mismatch issue between the encoder and decoder, embodiments of the present invention generate a complete full MVP candidate set. Therefore, there will be no more empty space in the MVP candidate set. One embodiment according to the present invention initializes each element of the MVP candidate set before applying the MVP candidate set generation process, where the MVP candidate set generation process can be a conventional approach. The initial MVP candidates are properly selected so that the MVP candidate set consisting of initial MVP candidates is complete and full. In other words, the size of the MVP candidate set is equal to a fixed target size and there is no redundant MVP candidate in the MVP candidate set. The values to be initialized for each element include MV in case of AMVP mode and prediction direction, reference index and MV in case of the Merge mode. FIG. 7 illustrates an exemplary flow chart of a system incorporating an embodiment of the present invention. The neighboring blocks are determined as shown in step 710. The MVP candidate set is then generated, where the MVP candidate set comprises initial MVP candidates associated with the neighboring blocks as shown in step 720. The MVP candidate set has a size equal to the fixed target size and the MVP candidate set has no redundant MVP candidate.

According to another embodiment of the present invention, a value is assigned to each empty (undefined) MVP if there is any empty MVP in the candidate set after applying the MVP candidate set generation and redundant MVP removal process. The procedure to replace any redundant MVP candidate according to embodiments of the present invention ensures the resulted MVP candidate set is complete and full. In other words, the size of the MVP candidate set is equal to the fixed target size and there is no redundant MVP candidate in the MVP candidate set. FIG. 8 illustrates an exemplary flow chart of a system incorporating an embodiment of the present invention. The neighboring blocks are determined as shown in step 810 and MVP candidate set is generated from MVP candidates associated with the neighboring blocks as shown in step 820, wherein a fixed target size is determined for the MVP candidate set. The redundancy is then checked in step 830. If there is any redundant MVP candidate, it is removed as shown in step 840. A complete and full MVP candidate set is then generated from the redundancy-removed MVP candidate set as shown in step 850. If the test in step 830 indicates that there is no redundant MVP candidate, the procedure is terminated. In one embodiment, the method to generate the complete full MVP candidate set is to assign a value to each empty MVP candidate, where the value is non-redundant with respect to the redundancy-removed MVP candidate set. In other words, the value does not cause any redundancy if the value is added to the MVP candidate set. The values to be assigned include MV in case of the AMVP mode, and prediction direction, reference index and MV in case of the Merge mode. For example, the zero vector (0,0) can be added to replace the empty (undefined) MVP in the AMVP candidate set. The zero vector with reference picture in list 0, i.e., (0,0) with reference frame index equals to 0 and the zero vector with reference picture in list 1, i.e., (0,0) with reference frame index equals to 0 can be added to replace the empty (undefined) MVP in the Merge candidate set.

In yet another embodiment according to the present invention, the method to generate a complete full MVP candidate set is to assign a value to each empty (undefined) MVP according to a rule. The values to be assigned include MV in case of the AMVP mode and prediction direction, reference index and MV in case of the Merge mode. After replacement MVP candidates are added to the MVP candidate set, redundancy is checked and redundant MVP removal is applied again. The above procedure of assigning value, checking redundancy, and removing redundant MVP candidates are repeated until the MVP candidate set is complete and full. For example, motion vector corresponding to (x,0), (−x,0), (0,y) or (0,−y) can be added to one of the MVP candidate set to replace the empty (undefined) MVP, where x is an integer value corresponding to horizontal motion vector and y is also an integer corresponding to vertical motion vector. An exemplary flow chart for generating a complete full MVP candidate set according to an embodiment of the present invention is illustrated in FIG. 9. One or more replacement MVP candidates are added to the redundancy-removed MVP candidate set to form a modified MVP candidate set as shown in step 910, wherein a value is assigned to each replacement MVP candidate according to a rule. One replacement MVP candidate is added for each redundant MVP candidate. After one or more replacement MVP candidates are added, the redundancy is checked in step 920. If there is no more redundant MVP candidate, the MVP candidate set is complete and full, and the procedure can be terminated. Otherwise, the redundant MVP candidate is removed as shown in step 930 and the procedure goes back to step 910 again.

Flow charts in FIG. 7 to FIG. 9 are intended to illustrate examples of systems incorporating embodiment of the present invention. The specific arrangements and configuration of these steps shall not be construed as limitations to the present invention. Some steps may be re-arranged to practice the present invention without departing from the spirit of the present invention. Also, some steps may be combined and some steps may be split to practice the present invention.

Embodiment of the present invention as described above may be implemented in various hardware, software codes, or a combination of both. For example, an embodiment of the present invention can be a circuit integrated into a video compression chip or program code integrated into video compression software to perform the processing described herein. An embodiment of the present invention may also be program code to be executed on a Digital Signal Processor (DSP) to perform the processing described herein. The invention may also involve a number of functions to be performed by a computer processor, a digital signal processor, a microprocessor, or field programmable gate array (FPGA). These processors can be configured to perform particular tasks according to the invention, by executing machine-readable software code or firmware code that defines the particular methods embodied by the invention. The software code or firmware code may be developed in different programming languages and different formats or styles. The software code may also be compiled for different target platforms. However, different code formats, styles and languages of software codes and other means of configuring code to perform the tasks in accordance with the invention will not depart from the spirit and scope of the invention.

The invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope. 

The invention claimed is:
 1. A method implemented in a video coder for deriving a motion vector predictor (MVP) candidate set for a block, the method comprising: determining neighboring blocks of the block; generating a first MVP candidate set from MVP candidates associated with the neighboring blocks, wherein a fixed target size is determined for the first MVP candidate set; determining whether one or more redundant MVP candidates exist in the first MVP candidate set; generating a second MVP candidate set according to the first MVP candidate set, wherein said generating the second MVP candidate set comprises removing said one or more redundant MVP candidates from the first MVP candidate set if said one or more redundant MVP candidates exist; generating a third MVP candidate set if a size of the second MVP candidate set is smaller than the fixed target size, wherein said generating the third MVP candidate set comprises adding one or more pre-defined replacement MVP candidates to the second MVP candidate set until a size of the third MVP candidate set equal to the fixed target size; and encoding or decoding the block using the third MVP candidate set; wherein a value is assigned to each pre-defined replacement MVP candidate, wherein when the block is encoded or to be encoded by Merge mode, the value corresponds to one or a combination of prediction direction, reference index, and motion vector, and said one or more pre-defined replacement MVP candidates added to the second MVP candidate set comprise both a first zero vector with a reference frame index equal to 0 in list 0 and a second zero vector with a reference frame index equal to 0 in list 1, wherein when the block is encoded or to be encoded by Advanced Motion Vector Prediction (AMVP) mode, the value corresponds to motion vector (MV), and said one or more pre-defined replacement MVP candidates added to the second MVP candidate set comprise one or more zero vectors.
 2. The method of claim 1, wherein one replacement MVP candidate is added for each redundant MVP candidate.
 3. The method of claim 1, wherein said generating the third MVP candidate set comprises: adding said one or more pre-defined replacement MVP candidates to second MVP candidate set to form a modified MVP candidate set, wherein the value is assigned to each pre-defined replacement MVP candidate according to a rule, and wherein one pre-defined replacement MVP candidate is added for each redundant MVP candidate; determining whether one or more new redundant MVP candidates exist in the modified MVP candidate set; removing said one or more new redundant MVP candidates from the modified MVP candidate set to form a new redundancy-removed MVP candidate set if said one or more new redundant MVP candidates exist; and repeating the above steps if said one or more new redundant MVP candidates exist; and wherein the third MVP candidate set corresponds to a final modified MVP candidate set.
 4. The method of claim 3, wherein the motion vector corresponds to (x,0), (−x,0), (0,y), or (0,−y), wherein x is a first integer corresponding to horizontal motion vector and y is a second integer corresponding to vertical motion vector.
 5. An apparatus for deriving a motion vector predictor (MVP) candidate set for a block, the apparatus comprising one or more circuits configured to: determine neighboring blocks of the block; generate a first MVP candidate set from MVP candidates associated with the neighboring blocks, wherein a fixed target size is determined for the first MVP candidate set; determine whether one or more redundant MVP candidates exist in the first MVP candidate set; generate a second MVP candidate set according to the first MVP candidate set, wherein said generating the second MVP candidate set comprises removing said one or more redundant MVP candidates from the first MVP candidate set if said one or more redundant MVP candidates exist; generate a third MVP candidate set if a size of the second MVP candidate set is smaller than the fixed target size, wherein said generating the third MVP candidate set comprises adding one or more pre-defined replacement MVP candidates to the second MVP candidate set until a size of the third MVP candidate set equal to the fixed target size; and encode or decode the block using the third MVP candidate set; wherein a value is assigned to each pre-defined replacement MVP candidate, wherein when the block is encoded or to be encoded by Merge mode, the value corresponds to one or a combination of prediction direction, reference index, and motion vector, and said one or more pre-defined replacement MVP candidates added to the second MVP candidate set comprise both a first zero vector with a reference frame index equal to 0 in list 0 and a second zero vector with a reference frame index equal to 0 in list 1, wherein when the block is encoded or to be encoded by Advanced Motion Vector Prediction (AMVP) mode, the value corresponds to motion vector (MV), and said one or more pre-defined replacement MVP candidates added to the second MVP candidate set comprise one or more zero vectors.
 6. The apparatus of claim 5, wherein one replacement MVP candidate is added for each redundant MVP candidate.
 7. The apparatus of claim 5, wherein said generating the third MVP candidate set comprises: adding said one or more pre-defined replacement MVP candidates to second MVP candidate set to form a modified MVP candidate set, wherein the value is assigned to each pre-defined replacement MVP candidate according to a rule, and wherein one pre-defined replacement MVP candidate is added for each redundant MVP candidate; determining whether one or more new redundant MVP candidates exist in the modified MVP candidate set; removing said one or more new redundant MVP candidates from the modified MVP candidate set to form a new redundancy-removed MVP candidate set if said one or more new redundant MVP candidates exist; and repeating the above steps if said one or more new redundant MVP candidates exist; and wherein the third MVP candidate set corresponds to a final modified MVP candidate set.
 8. The apparatus of claim 7, wherein the motion vector corresponds to (x,0), (−x,0), (0,y), or (0,−y), wherein x is a first integer corresponding to horizontal motion vector and y is a second integer corresponding to vertical motion vector.
 9. A non-transitory computer readable medium storing a computer-executable program, the computer-executable program, when executed, causing a video coder to perform the following steps: determining neighboring blocks of a block; generating a first motion vector predictor (MVP) candidate set from MVP candidates associated with the neighboring blocks, wherein a fixed target size is determined for the first MVP candidate set; determining whether one or more redundant MVP candidates exist in the first MVP candidate set; generating a second MVP candidate set according to the first MVP candidate set, wherein said generating the second MVP candidate set comprises removing said one or more redundant MVP candidates from the first MVP candidate set if said one or more redundant MVP candidates exist; generating a third MVP candidate set if a size of the second MVP candidate set is smaller than the fixed target size, wherein said generating the third MVP candidate set comprises adding one or more pre-defined replacement MVP candidates to the second MVP candidate set until a size of the third MVP candidate set equal to the fixed target size; and encoding or decoding the block using the third MVP candidate set; wherein a value is assigned to each pre-defined replacement MVP candidate, wherein when the block is encoded or to be encoded by Merge mode, the value corresponds to one or a combination of prediction direction, reference index, and motion vector, and said one or more pre-defined replacement MVP candidates added to the second MVP candidate set comprise both a first zero vector with a reference frame index equal to 0 in list 0 and a second zero vector with a reference frame index equal to 0 in list 1, wherein when the block is encoded or to be encoded by Advanced Motion Vector Prediction (AMVP) mode, the value corresponds to motion vector (MV), and said one or more pre-defined replacement MVP candidates added to the second MVP candidate set comprise one or more zero vectors. 